package com.tarena.demo.luban.all.main;

import com.alibaba.csp.sentinel.slots.block.flow.FlowRule;
import com.alibaba.csp.sentinel.slots.block.flow.FlowRuleManager;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;

import java.util.ArrayList;
import java.util.List;

@SpringBootApplication
@MapperScan("com.tarena.demo.luban.all.main.mapper")
@ImportResource("dubbo.xml")
public class OrderMain {
    public static void main(String[] args) {
        SpringApplication.run(OrderMain.class,args);
        /*List<FlowRule> flowRules=new ArrayList<>();
        FlowRule flowRule01=new FlowRule();
        flowRule01.setResource("addOrder");
        flowRule01.setGrade(1);
        flowRule01.setCount(500);
        FlowRule flowRule02=new FlowRule();
        flowRule02.setResource("addOrder");
        flowRule02.setGrade(0);
        flowRule02.setCount(500);
        flowRules.add(flowRule01);
        flowRules.add(flowRule02);
        FlowRuleManager.loadRules(flowRules);*/
    }
}
